//
//  CYXiangShuiTiWenTableViewCell.m
//  cyydt
//
//  Created by chu on 2019/2/1.
//  Copyright © 2019 chu. All rights reserved.
//

#import "CYXiangShuiTiWenTableViewCell.h"

@implementation CYXiangShuiTiWenTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.headImageView.layer.cornerRadius = self.headImageView.frame.size.height / 2;
    self.headImageView.layer.masksToBounds = YES;
}

- (void)setModel:(CYFriendModel *)model{
    _model = model;
    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.headImageView.frame.size]];
    self.shenfenImageView.hidden = NO;
    self.nicknameLabel.text = model.nickName;
    self.introLabel.text = model.cy_description;
    if ([model.tag isEqualToString:@"1"]) {
        //普通
        self.shenfenImageView.hidden = YES;
        
    }else if ([model.tag isEqualToString:@"2"]){
        //导师号
        self.shenfenImageView.image = [UIImage imageNamed:@"wd_gezl_dsbq"];
    }else if ([model.tag isEqualToString:@"3"]){
        //官方号
        self.shenfenImageView.image = [UIImage imageNamed:@"wd_gezl_gfbq"];
    }else{
        //项目号
        self.shenfenImageView.image = [UIImage imageNamed:@"标签"];
    }
    
    self.selBtn.selected = [model.isSelecte boolValue];
}

- (IBAction)selAction:(UIButton *)sender {
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
